package com.jshcbd.modules.asset.vo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author zhoucd
 * @date
 * @description
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel( description = "资产维修记录")
public class RepairVo implements Serializable {
    private static final long serialVersionUID = 1L;

    private String id;

    private String assetId;

    @ApiModelProperty(value = "送修时间")
    private Date startDate;

    @ApiModelProperty(value = "完成时间")
    private Date finishDate;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty("联系人")
    private String contacts;


    @ApiModelProperty("维修完成验收照片")
    private String accepPhoto;


    @ApiModelProperty(value = "备注")
    private String note;


    @ApiModelProperty(value = "合同编号",required=true)
    @NotNull
    private String contractNamber;

    @ApiModelProperty(value = "资产ID",required=true)
    @NotNull
    private String number;

    @ApiModelProperty(value = "入库日期",required=true)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull
    private Date inDate;

    @ApiModelProperty(value = "批次",required=true)
    @NotNull
    private String batch;

    @ApiModelProperty(value = "资产名称",required=true)
    @NotNull
    private String name;

    @ApiModelProperty(value = "资产购买单位",required=true)
    @NotNull
    private String buyer;


    @ApiModelProperty(value = "资产计量单位",required=true)
    @NotNull
    private String unit;

    @ApiModelProperty(value = "资产型号",required=true)
    @NotNull
    private String model;

    @ApiModelProperty(value = "维修状态（1：维修中/2：已维修）")
    private Integer repairState;

    @ApiModelProperty(value = "资产状态(1:闲置/2:已领用/3:已处置),默认闲置")
    private Integer state;


    @ApiModelProperty(value = "资产使用年限",required=true)
    @NotNull
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date usefulLife;

    @ApiModelProperty(value = "资产使用状态（1:正常使用/2:损坏）,默认正常使用")
    private Integer useState;

    @ApiModelProperty(value = "供应商",required=true)
    @NotNull
    private String manufacturer;

    @ApiModelProperty(value = "价格",required=true)
    @NotNull
    private BigDecimal price;

    @ApiModelProperty(value = "是否含税",required=true)
    @NotNull
    private Boolean isFax;

    @ApiModelProperty(value = "是否属于固定资产",required=true)
    @NotNull
    private Boolean isFixed;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "资产使用时间")
    private Date startUsetime;


    @ApiModelProperty(value = "资产照片")
    private String  photo;



    @ApiModelProperty(value = "资产领用ID")
    private String receiveId;

    @ApiModelProperty(value = "资产分类ID")
    private String classesId;

    @ApiModelProperty(value = "rfid")
    private String rfid;

    @ApiModelProperty(value = "处置时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date disDate;

    @ApiModelProperty(value = "领用人")
    private String receiver;

    @ApiModelProperty(value = "联系电话")
    private String telphone;

    @ApiModelProperty(value = "领取公司ID")
    private String companyId;

    @ApiModelProperty(value = "归还日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date dueDate;


    @ApiModelProperty(value = "领用备注")
    private String receiveNote;

    @ApiModelProperty(value = "领用公司名称")
    private String companyName;

    @ApiModelProperty(value = "资产分类编码")
    private String code;

    @ApiModelProperty(value = "资产大类")
    private String classes;

    @ApiModelProperty(value = "资产分类名称")
    private String typeName;

    @ApiModelProperty(value = "折旧总月数")
    private Integer depreciationMonth;


}
